<template>
  <div class="load-mask" v-show="isLoadShow">
    <div class="spinner">
      <div class="dot1"></div>
      <div class="dot2"></div>
    </div>
    <!--文字开始-->
    <p>{{contFont}}</p>
    <!--文字结束-->
  </div>
</template>

<script>
export default {
  props: {
    isLoadShow: {
      type: Boolean,
      default: true
    },
    contFont: {
      type: String
    }
  }
}
</script>

<style lang="scss" scoped>
.load-mask {
  position: fixed;
  z-index: 99999;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, .5);
  overflow: hidden;
}
p {
  position: absolute;
  font-family: 'Open Sans';
  font-weight: 600;
  font-size: .6rem;
  text-transform: uppercase;
  left: 50%;
  top: 58%;
  margin-left: -2rem;
  color: #fff;
}
.spinner {
  margin: 9rem auto 0;
  width: 4.5rem;
  height: 4.5rem;
  position: relative;
  text-align: center;

  -webkit-animation: rotate 2.0s infinite linear;
  animation: rotate 2.0s infinite linear;
}

.dot1, .dot2 {
  width: 60%;
  height: 60%;
  display: inline-block;
  position: absolute;
  top: 0;
  background-color: #67CF22;
  border-radius: 100%;

  -webkit-animation: bounce 2.0s infinite ease-in-out;
  animation: bounce 2.0s infinite ease-in-out;
}

.dot2 {
  top: auto;
  bottom: 0px;
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
}

@-webkit-keyframes rotate { 100% { -webkit-transform: rotate(360deg) }}
@keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg) }}

@-webkit-keyframes bounce {
  0%, 100% { -webkit-transform: scale(0.0) }
  50% { -webkit-transform: scale(1.0) }
}

@keyframes bounce {
  0%, 100% {
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 50% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
  }
}
</style>
